<template>
	<view>
		<view>
			<view class="z-padding-lr-32 type-box z-flex-c-s-b z-margin-t-40">
				<view class="">姓名/性别</view>
				<view>{{ name }}/{{ sex == 1 ? '女' : '男' }}/{{ age }}岁</view>
			</view>
			<view class="z-padding-lr-32 type-box z-flex-c-s-b z-margin-t-40">
				<view class="">身份证号</view>
				<view>
					{{ idcard }}
				</view>
			</view>

			<!-- 正面 -->
			<view class="z-margin-t-40 z-padding-l-32">
				<view class="title">身份证照片（人像面）</view>
				<image class="img z-margin-t-24" :src="cdn(front_image)" mode="aspectFit"></image>
			</view>
			<!-- 反面 -->
			<view class="z-margin-t-40 z-padding-l-32">
				<view class="title">身份证照片（国徽面）</view>
				<image class="img z-margin-t-24" :src="cdn(opposite_image)" mode="aspectFit"></image>
			</view>
			<!-- 实拍 -->
			<view class="z-margin-t-40 z-padding-l-32">
				<view class="title">实拍照（正面免冠素颜照片）</view>
				<image class="img-reali z-margin-t-24" :src="cdn(user_image)" mode="aspectFit"></image>
			</view>
			<view class="cotton"></view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			name: '',
			sex: 0,
			age: '',
			idcard: '',
			front_image: '',
			opposite_image: '',
			user_image: ''
		};
	},
	onLoad(options) {
		this.getResult();
	},
	methods: {
		getResult() {
			this.http.post('skill/apply', {}, true, false).then((res) => {
				if (res.data) {
					this.name = res.data.name,
					this.sex = res.data.sex,
					this.age = res.data.age,
					this.idcard = res.data.idcard,
					this.front_image = res.data.front_image,
					this.opposite_image = res.data.opposite_image,
					this.user_image = res.data.user_image
				} else {
					this.util.skip('/service/enter/enter');
				}
			});
		}
	}
};
</script>

<style>
.type-box {
	width: 616rpx;
	height: 120rpx;
	background: #f5f7f9;
	border-radius: 20rpx 20rpx 20rpx 20rpx;
	opacity: 1;
	font-size: 30rpx;
	font-weight: 500;
	color: #6b738b;
	margin: auto;
}
.title {
	font-size: 26rpx;
	font-weight: 500;
	color: #1c274c;
}
.img {
	width: 523rpx;
	height: 331rpx;
	border-radius: 0rpx 0rpx 0rpx 0rpx;
	opacity: 1;
}
.img-reali {
	width: 254rpx;
	height: 387rpx;
	border-radius: 0rpx 0rpx 0rpx 0rpx;
	opacity: 1;
}
.cotton {
	height: 100rpx;
}
</style>
